package cn.chencq.moudle.sys.service;

import java.util.List;
import java.util.Map;

import cn.chencq.moudle.sys.entity.SysUser;
import cn.chencq.page.PageBean;
import cn.chencq.page.PageParam;

public interface BaseService<T>  {

	/**
	 * 
	 * @Title: listPage
	 * @Description: 分页查询
	 * @param pageParam
	 * @return PageBean
	 */
	PageBean<T> listPage(PageParam pageParam);

	/**
	 * 
	 * @Title: save
	 * @Description: 插入
	 * @param t
	 */
	void save(T t);

	/**
	 * 
	 * @Title: batchSave
	 * @Description: 批量插入
	 * @param list
	 */
	void batchSave(List<T> list);
	
	/**
	 * 
	 * @Title: updateByPrimaryKey
	 * @Description: 按主键更新
	 * @param t
	 * @return int
	 */
	int updateByPrimaryKey(T t);

	/**
	 * 
	 * @Title: deleteByPrimaryKey
	 * @Description: 按主键删除
	 * @param id
	 * @return int
	 */
	int deleteByPrimaryKey(Object id);

	/**
	 * 
	 * @Title: batchDeleteByPks
	 * @Description: 批量删除
	 * @param list
	 * @return int
	 */
	int batchDeleteByPks(List<?> list);

	/**
	 * 
	 * @Title: getById
	 * @Description: 按主键查找
	 * @param id
	 * @return T
	 */
	T selectByPrimaryKey(Object id);

	/**
	 * 
	 * @Title: queryList
	 * @Description: 不分页查询
	 * @param params
	 * @return List<T>
	 */
	List<T> queryList(Map<String, Object> params);
}
